import request from "@/utils/request"

// 查询所有教练
export const getCoaches=(page)=>{
    return request.get("/coach/getAll?page="+page)
}
// 添加教练
export const addACoach=(coach)=>{    
    return request.post("/coach/add",coach)
}
// 搜索教练
export const searchACoach=(coach_name)=>{    
    return request.get("/coach/search?name="+coach_name)
}
// 修改教练
export const updateACoach=(coach)=>{    
    return request.put("/coach/update",coach)
}
// 删除教练
export const deleteACoach=(coach_id)=>{    
    return request.delete("/coach/delete?id="+coach_id)
}